package com.example.financecollegeorderdish

import android.widget.TextView
import cn.bingoogolapple.badgeview.annotation.BGABadge
import com.blankj.utilcode.util.PathUtils
import com.blankj.utilcode.util.TimeUtils
import com.example.financecollegeorderdish.db.AppDatabase
import com.wuhao.lib_base.BaseApplication
import com.wuhao.lib_common.utils.LoggerHelper
import dagger.hilt.android.HiltAndroidApp
import io.reactivex.rxjava3.plugins.RxJavaPlugins
import io.reactivex.rxjava3.schedulers.Schedulers
import me.jessyan.autosize.AutoSizeConfig
import me.jessyan.autosize.unit.Subunits
import java.util.concurrent.Executors
@HiltAndroidApp
public class AppApplication : BaseApplication() {
    var room: AppDatabase? = null
    override fun onCreate() {
        super.onCreate()
        LoggerHelper.getInstance().init()
        room = AppDatabase.getInstance(context)
        // 创建一个固定大小的线程池
        val customThreadPool = Executors.newFixedThreadPool(1)
        RxJavaPlugins.setIoSchedulerHandler { Schedulers.from(customThreadPool) }
        RxJavaPlugins.setComputationSchedulerHandler { Schedulers.from(customThreadPool) }
        //JKS信息：
        //别名：caiyueyunduan
        //密码：123456
    }
    /**
     * 屏幕适配初始化，可以设置副单位，目前暂不考虑
     */
    fun initScreenAdapt(){
        AutoSizeConfig.getInstance().getUnitsManager()
            .setSupportDP(false)
            .setSupportSP(false)
            .setSupportSubunits(Subunits.MM);
    }


}